﻿<%@ Page Title="Home - Traditional Maltese Cuisine" Language="C#" MasterPageFile="~/MainMasterPage.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TraditionalMalteseCuisine.Default" %>
<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <div class="middle_center"><h3>WELCOME TO TRADITIONAL MALTESE CUISINE</h3></div>
    <p>
        If you want to experience authentic Maltese cooking you need to eat in a Maltese home, where Maltese food recipes have been handed by word of mouth over many generations. Maltese food has evolved over thousands of years, influenced by the many cultures brought over by foreign powers who at one time or another occupied or traded with Malta. This foreign influence mixed with indigenous peasant food, which was mainly based on local vegetable produce since most farm animals were kept to produce milk and eggs or help on the farm.
        <br /><br />
        Cooking in Malta and Gozo is very important in our way of life, and family meals have survived the changes in Maltese social fabric. This recipe collection aims to bring together a wide selection of Maltese food recipes including soups (Sopop), meat and poultry (laħam), pies (torot), bread (ħobż), pasta vegetables, sweets (ħelu), and sauces (zlazi). We are also trying to group these recipes by course or by occasion.
        <br /><br />
        We encourage you to register and add more Ricetti, including those recipes handed over by your grandparents (riċetta tan-Nanna), on a daily basis, hoping to make this site one of the biggest online repositories of Maltese food recipes.
        <br />
    </p>
    <br />
    <br />
    <hr style="width: 85%;" />
    <br />
    <asp:UpdatePanel ID="updMostRecentPanel" runat="server">
        <ContentTemplate>
            <p class="label" style="text-align: justify;">The following are the <asp:DropDownList ID="cmbMaxRecentRecords" runat="server" CssClass="combobox" Width="40px" AutoPostBack="True" OnSelectedIndexChanged="cmbMaxRecentRecords_SelectedIndexChanged">
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                    </asp:DropDownList> most recent additions:</p>
            <asp:Repeater ID="dgvMostRecent" runat="server">
                <HeaderTemplate><div id="preview_listing"></HeaderTemplate>
                <ItemTemplate>
                    <div id="preview_row" title="Click to view recipe">
                        <a href='<%# string.Format("details.aspx?item={0}", Eval("id")) %>'>
                            <img src="SiteContentImages/MostRecent.png" class="profile_thumbnail_image top_right" style="float: left; border: none; box-shadow: none; width: 15px;" />
                            <img src="SiteContentImages/MostRecent.png" class="profile_thumbnail_image top_right" style="float: right; border: none; box-shadow: none; width: 15px;" />
                            <div id="preview_row_header">
                                <%# Eval("recipe_name") %>
                            </div>
                            <div id="preview_row_content">
                                <img src='<%# Eval("thumbnail_location") %>' alt="Click for more details..." class="thumbnail_image" />
                            </div>
                        </a>
                        <div id="preview_row_footer">
                            by <a href='<%# string.Format("profile.aspx?user={0}", Eval("member_id")) %>'><%# string.Format("{0} {1}", Eval("firstname"), Eval("lastname")) %></a>
                        </div>
                    </div>
                </ItemTemplate>
                <FooterTemplate></div></FooterTemplate>
            </asp:Repeater>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <br />
    <hr style="width: 85%;" />
    <br />
    <asp:UpdatePanel ID="updMostLikedPanel" runat="server">
        <ContentTemplate>
            <p class="label" style="text-align: justify;">The following are the <asp:DropDownList ID="cmbMaxLikedRecords" runat="server" CssClass="combobox" Width="40px" AutoPostBack="True" OnSelectedIndexChanged="cmbMaxLikedRecords_SelectedIndexChanged">
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                    </asp:DropDownList> most liked recipes:</p>
            <asp:Repeater ID="dgvMostLiked" runat="server">
                <HeaderTemplate><div id="preview_listing"></HeaderTemplate>
                <ItemTemplate>
                    <div id="preview_row" title='<%# string.Format("{0} member(s) like this!", Eval("TotalLikes")) %>'>
                        <a href='<%# string.Format("details.aspx?item={0}", Eval("recipe_id")) %>'>
                            <img src="App_Themes/MainStyleSheet/Like.png"  class="profile_thumbnail_image top_right" style="float: left; border: none; box-shadow: none;" />
                            <img src="App_Themes/MainStyleSheet/Like.png"  class="profile_thumbnail_image top_right" style="float: right; border: none; box-shadow: none;" />
                            <div id="preview_row_header">
                                <%# Eval("recipe_name") %>
                            </div>
                            <div id="preview_row_content">
                                <img src='<%# Eval("thumbnail_location") %>' alt="Click for more details..." class="thumbnail_image" />
                            </div>
                        </a>
                        <div id="preview_row_footer">
                            by <a href='<%# string.Format("profile.aspx?user={0}", Eval("member_id")) %>'><%# string.Format("{0} {1}", Eval("firstname"), Eval("lastname")) %></a>
                        </div>
                    </div>
                </ItemTemplate>
                <FooterTemplate></div></FooterTemplate>
            </asp:Repeater>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <br />
    <hr style="width: 85%;" />
    <br />
    <asp:UpdatePanel ID="updMostRatedPanel" runat="server">
        <ContentTemplate>
            <p class="label" style="text-align: justify;">The following are the <asp:DropDownList ID="cmbMaxRatedRecords" runat="server" CssClass="combobox" Width="40px" AutoPostBack="True" OnSelectedIndexChanged="cmbMaxRatedRecords_SelectedIndexChanged">
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                    </asp:DropDownList> most rated recipes:</p>
            <asp:Repeater ID="dgvMostRated" runat="server">
                <HeaderTemplate><div id="preview_listing"></HeaderTemplate>
                <ItemTemplate>
                    <div id="preview_row" title='<%# string.Format("{0} of 5 ({1} votes)", Math.Round(double.Parse(Eval("AverageRating").ToString()), 2), Eval("TotalVotes")) %>'>
                        <a href='<%# string.Format("details.aspx?item={0}", Eval("recipe_id")) %>'>
                            <img src="SiteContentImages/Rating.png"  class="profile_thumbnail_image top_right" style="float: left; border: none; box-shadow: none;" />
                            <img src="SiteContentImages/Rating.png"  class="profile_thumbnail_image top_right" style="float: right; border: none; box-shadow: none;" />
                            <div id="preview_row_header">
                                <%# Eval("recipe_name") %>
                            </div>
                            <div id="preview_row_content">
                                <img src='<%# Eval("thumbnail_location") %>' alt="Click for more details..." class="thumbnail_image" />
                            </div>
                        </a>
                        <div id="preview_row_footer">
                            by <a href='<%# string.Format("profile.aspx?user={0}", Eval("member_id")) %>'><%# string.Format("{0} {1}", Eval("firstname"), Eval("lastname")) %></a>
                        </div>
                    </div>
                </ItemTemplate>
                <FooterTemplate></div></FooterTemplate>
            </asp:Repeater>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <br />
    <hr style="width: 85%;" />
    <br />
    <asp:UpdatePanel ID="updTopMembersPanel" runat="server">
        <ContentTemplate>
            <p class="label" style="text-align: justify;">The following are the <asp:DropDownList ID="cmbMaxFollowedMembers" runat="server" CssClass="combobox" Width="40px" AutoPostBack="True" OnSelectedIndexChanged="cmbMaxFollowedMembers_SelectedIndexChanged">
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                    </asp:DropDownList>  most followed members:</p>
            <asp:Repeater ID="dgvTopMembers" runat="server">
                <HeaderTemplate><div id="preview_listing"></HeaderTemplate>
                <ItemTemplate>
                    <div id="preview_row" title="Click to visit profile">
                        <a href='<%# string.Format("profile.aspx?user={0}", Eval("subscribed_to_member_id")) %>'>
                                <img src="SiteContentImages/Award.png" class="profile_thumbnail_image top_right" style="float: left; border: none; box-shadow: none; width: 15px;" />
                                <img src="SiteContentImages/Award.png" class="profile_thumbnail_image top_right" style="float: right; border: none; box-shadow: none; width: 15px;" />
                            <div id="preview_row_header">
                                <%# string.Format("{0} {1}", Eval("firstname"), Eval("lastname")) %>
                            </div>
                            <div id="preview_row_content">
                                <img src='<%# Eval("avatar_image") %>' alt="Click for more details..." class="thumbnail_image" />
                            </div>
                            <div id="preview_row_footer">
                                <%# string.Format("{0}", Eval("TotalSubscriptions")) %> member(s) subscribed
                            </div>
                        </a>
                    </div>
                </ItemTemplate>
                <FooterTemplate></div></FooterTemplate>
            </asp:Repeater>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <hr style="width: 85%;" />
    <br />
    <p class="label" style="text-align: justify;">Daily Activity Monitor:</p>
    <asp:UpdatePanel ID="updChartPanel" runat="server">
        <ContentTemplate>
        <div id="chart_area">
            <asp:Chart ID="chrDailyMembersActivity" runat="server" DataSourceID="dsActivityLogStatistics" ToolTip="Total daily site member activity" CssClass="chart" Palette="Bright" Width="500px" Height="250px">
                <Series>
                    <asp:Series Name="Series" LegendText="Total Daily Activity" ChartType="Spline" XValueMember="activity_date" YValueMembers="TotalActivity" Font="Cambria, 8.25pt" Legend="Legend"></asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea"></asp:ChartArea>
                </ChartAreas>
                <Legends>
                    <asp:Legend Name="Legend" TitleFont="Cambria, 9.75pt, style=Bold"></asp:Legend>
                </Legends>
                <Titles>
                    <asp:Title Font="Cambria, 9.75pt" Name="Title" Text="Total Daily Activity" TextStyle="Frame">
                    </asp:Title>
                </Titles>
            </asp:Chart>
            <asp:SqlDataSource ID="dsActivityLogStatistics" runat="server" ConnectionString="<%$ ConnectionStrings:TraditionalMalteseCuisine %>" ProviderName="<%$ ConnectionStrings:TraditionalMalteseCuisine.ProviderName %>" SelectCommand="SELECT [activity_date], [TotalActivity] FROM [vwActivityLogTotalDailyActivity]"></asp:SqlDataSource>
        </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <hr style="width: 85%;" />
    <br />
</asp:Content>